home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 27 / CDROM27.iso / share / progra / mai / Multimedia, Open and Close the CD drive door < prev    next >
Encoding:
Text File  |  1997-07-24  |  478 b   |  13 lines

  1. Description: Opens / Closes the CD drive door without OCX 
  2.  
  3. 'Private Declare Function mciSendString Lib "winmm.dll" Alias_ 
  4.  "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, _
  5.  ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
  6.  
  7.  
  8. 'Open CD drive door
  9. retvalue = mciSendString("set CDAudio door open", returnstring, 127, 0)
  10.  
  11. 'Close CD drive door
  12. retvalue = mciSendString("set CDAudio door closed", returnstring, 127, 0)
  13.